package servers;

import org.grlea.log.SimpleLogger;

public class POPAnything implements Runnable  {

	private static final SimpleLogger log = new SimpleLogger(POPAnything.class);
	private IServer server = null ;
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		log.entry("main");
		POPServer ps = new POPServer();
		SMTPServer ss = new SMTPServer();
		POPAnything pop = new POPAnything(ps);
		Thread popThread = new Thread(pop, "POP Server");
		popThread.start();
		
		POPAnything smtp = new POPAnything(ss);
		Thread smtpThread = new Thread(smtp,"SMTP Server");
		smtpThread.start();

		log.exit("main");
	}

	public POPAnything(IServer server) {
		this.server = server ;
	}

	public void run() {
		getServer().listen();
	}

	public IServer getServer() {
		return server;
	}

	public void setServer(IServer server) {
		this.server = server;
	}
}
